﻿<Window x:Class="Wallace.IDE.SalesForce.UI.UserSelectWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Select a user" 
        Height="300" 
        Width="350"
        MinHeight="200"
        MinWidth="200"        
        WindowStartupLocation="CenterOwner"
        ResizeMode="NoResize"
        Style="{StaticResource ChromeWindowStyle}"
        Background="{StaticResource CaptionBackgroundBrush}">
    <Border Padding="10,5,20,5">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            
            <TextBlock Grid.Row="0"
                       FontWeight="Bold"
                       Text="Search for users:" />
            
            <DockPanel Grid.Row="1"
                       LastChildFill="True">
                <Button x:Name="buttonSearch" 
                        DockPanel.Dock="Right" 
                        Margin="4,0,0,0"
                        IsEnabled="False"
                        Click="buttonSearch_Click">
                    <Image Source="/Resources/Find.png" Height="16" Width="16" />
                </Button>
                <TextBox x:Name="textBoxSearch"
                         TextChanged="textBoxSearch_TextChanged"
                         KeyDown="textBoxSearch_KeyDown" />
            </DockPanel>
            
            <TextBlock x:Name="textBlockResults" 
                       Grid.Row="2"
                       FontWeight="Bold"
                       Margin="0,5,0,0"
                       Text="" />
            
            <ScrollViewer x:Name="scrollViewerResults" 
                          Grid.Row="3"
                          Visibility="Collapsed">
                <ListBox x:Name="listBoxResults"
                         BorderThickness="0"
                         SelectionChanged="listBoxResults_SelectionChanged"
                         MouseDoubleClick="listBoxResults_MouseDoubleClick" />
            </ScrollViewer>

            <StackPanel Grid.Row="4"
                        Orientation="Horizontal"
                        VerticalAlignment="Bottom"
                        HorizontalAlignment="Right">
                <Button x:Name="buttonSelect"
                        Margin="5"
                        Padding="10,5,10,5"
                        IsEnabled="False"
                        Click="buttonSelect_Click">
                    Select
                </Button>
                <Button Margin="5"
                        Padding="10,5,10,5"
                        Click="buttonCancel_Click">
                    Cancel
                </Button>
            </StackPanel>

        </Grid>
    </Border>
</Window>
